//
//  LaunchWebViewController.m
//  CToolBox
//
//  Created by 张吉旭 on 17/3/18.
//  Copyright © 2017年 yj. All rights reserved.
//

#import "LaunchWebViewController.h"
#import "LaunchAdManager.h"

@interface LaunchWebViewController ()

@end

@implementation LaunchWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self makeUI];
}

-(void)makeUI
{
    
    
    UIView * headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 64)];
    headerView.backgroundColor = HEXCOLOR(kColorBlue1, 1);
    [self.view addSubview:headerView];

    UILabel * titleLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, headerView.bounds.size.width, 44)];
    titleLab.textColor = [UIColor whiteColor];
    titleLab.text = @"详情";
    titleLab.font = [UIFont boldSystemFontOfSize:18];
    titleLab.textAlignment = NSTextAlignmentCenter;
    [headerView addSubview:titleLab];
    
    UIButton * closeBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 20, 44, 44)];
    [closeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [closeBtn setTitle:[[IconFont shareInstance] iconfanhui] forState:UIControlStateNormal];
    closeBtn.titleLabel.font = [UIFont fontWithName:@"IconFont" size:25];
    [closeBtn addTarget:self action:@selector(closeBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    [headerView addSubview:closeBtn];
    
    self.webView.frame = CGRectMake(0, headerView.yj_height, WIDTH, HEIGHT-headerView.yj_height);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


-(void)closeBtnClick:(id)sender
{
    [LaunchAdManager shareInstance].isShowTime = NO;
    [self dismissViewControllerAnimated:YES completion:nil];
}


@end
